<%@ page import="java.time.LocalDate" %><%--
  Created by IntelliJ IDEA.
  User: 李凯
  Date: 2025/3/31
  Time: 14:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%! int count = 100;%>
<%! String   getColor(){ return "red";}%>

<%
    // Java 代码
    int a=1,b=2;
    System.out.println(a+b);

    //调用申明中的变量和方法
    System.out.println(count);
    System.out.println(getColor());
%>
<%=LocalDate.now()%>

<%=count%>

<%=getColor()%>

</body>
</html>
